#include <stdio.h>
#include <stdlib.h>
#include "sqstack.h"



int main()
{
	sqstack *st;
	datatype arr[] = {19,23,0,45,67};
	st = st_create();
	if (st == NULL)
		exit(1);
	int i = 0;
	for (i=0;i<sizeof(arr)/sizeof(*arr);i++)
	{
		st_push(st,&arr[i]);
	}
#if 0
	datatype pop_temp = 0;
	st_pop(st,&pop_temp);
	printf("pop -temp :%d\n",pop_temp);

	datatype temp = 1;
	int ret = 0;
	ret = st_push(st,&temp);
	if (ret != 0)
	{
		fprintf(stderr,"st_push error!\n");
		exit(1);
	}
#endif
#if 0
	st_travel(st);
	datatype data = 0;
	while(st_pop(st,&data) ==  0)
	{
		printf("st_pop data:%d\n",data);
	}
#endif
	st_travel(st);

	datatype data = 0;
	st_top(st,&data);
	printf("st_top data:%d\n",data);
	st_destroy(st);

	exit(0);
}
